Initialize HPWHsim presets from embedded CBOR#551
Conversation
…sim/cse into init-presets-from-cbor-hpwh
nealkruis
left a comment
There was a problem hiding this comment.
A few issues here that still need to be resolve. Also needs to be updated with latest main.
.github/workflows/build-and-test.yml
Outdated
| - name: Install uv | ||
| uses: astral-sh/setup-uv@v5 | ||
| - name: Set up Python | ||
| run: uv python install |
There was a problem hiding this comment.
Use the same setup as HPWHsim.
There was a problem hiding this comment.
Only update report files with meaningful differences (i.e., not lines preceded with a !).
There was a problem hiding this comment.
Is this an expected change? It's more than a a few decimal places.
There was a problem hiding this comment.
This file also has bigger than expected differences that need to be justified.
There was a problem hiding this comment.
@nealkruis The differences are primarily due to the use of grid representations replacing polynomials in performance maps, and the limited ability to reproduce a quadratic function with a cubic spline. I have made extensive effort to minimize these difference.
test/ref-macos64-appleclang/dhwx.rep
Outdated
There was a problem hiding this comment.
What's happening in this file?
|
@nealkruis Reduced the executable size by moving model initialization to source file. |
|
@chipbarnaby 32-bit EXE is now 8.6 MB. |
|
I think we can temporarily live with an 8.6 mb exe. But tuning the number of points and implementing external files should still be a priority. |
|
@nealkruis Added Install uv to complete build-doc job in build-and-test.yml. Added |
|
The most recent commit is running into a few regression diffs. The concerning ones are submeter.rep and chdhw.rep, where the Electric Meter output is off in the more significant digits, as well as the energy balance on wsWH, which I guess is a water heater. |
This reverts commit 0ce3a1c.
|
There's one place where I left in the new BradfordWhite model names, hoping it won't be too much of a problem since adding the full models is up next. |
nealkruis
left a comment
There was a problem hiding this comment.
@tanaya-mankad this needs documentation updates and the Ice Air models. Then I think we can use this branch for testing CBECC.
The initialization of HPWH models is changed to load from a
hpwh_data_modelrepresentation embedded within the HPWHsim source code in CBOR format, rather than via separate code-based setup for each model. These representations were themselves generated from the original code-based setups, which were converted to JSON, then embedded as CBOR. These JSON model files are included with the HPWHsim repository at test/model_json. The embedded representations are generated from these JSON files during the CMake build. Generation is done from python using theuvpackage manager, which is installed during build.